<?php

$ini = ini_set("soap.wsdl_cache_enabled", 0);
if(!isset($_COOKIE['MySession'])){
	$url = "http://localhost/apps/e-commerce/freeway/custom/webservices/index.php?service=Session";
	$Client = new SoapClient($url);
	$Client->sessionStart();
	$this_Session = $Client->returnSID();
	setcookie('MySession', $this_Session);
	unset($Client);	
}
else 
	$this_Session = $_COOKIE['MySession'];
	
$url = "http://localhost/apps/e-commerce/freeway/custom/webservices/index.php?service=CustomerLogin";
$Client = new SoapClient($url);
$Client->__setCookie('ws_freeway', $this_Session);

$login = $Client->Login('jon@digidiamond.net', 'pass123');
unset($Client);
	
$url = "http://localhost/apps/e-commerce/freeway/custom/webservices/index.php?service=ShoppingCart";
$Client = new SoapClient($url);
$Client->__setCookie('ws_freeway', $this_Session);
echo $Client->Contents();

?>

<pre>
<?= var_dump($Client->SessionVars()); ?>
<?= var_dump($login); ?>
<?= var_dump($_COOKIE); ?>
<?= var_dump($Client->_cookies); ?>
<?= var_dump($_SESSION); ?>
</pre>

